import { DEFAULT_LAYOUT, PAGE_LAYOUT } from '@/router/constans';

export default {
  path: '/system',
  name: 'System',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '系统管理',
    requiresAuth: true,
    order: 7,
    iconfont: 'icon-xitongshezhi',
  },
  children: [
    {
      path: 'system-user',
      name: 'SystemUser',
      component: () => import('@/views/system/user/index.vue'),
      meta: {
        locale: '用户管理',
        requiresAuth: true,
        permission: 'system:user:list',
        iconfont: 'icon-yonghuguanli_huaban',
      },
    },
    {
      path: 'system-role',
      name: 'SystemRole',
      component: () => import('@/views/system/role/index.vue'),
      meta: {
        locale: '角色管理',
        requiresAuth: true,
        permission: 'system:role:list',
        iconfont: 'icon-jurassic_add-user',
      },
    },
    {
      path: 'system-role-users/:roleId?',
      name: 'SystemRoleUsers',
      component: () => import('@/views/system/role/users.vue'),
      meta: {
        locale: '分配用户',
        requiresAuth: true,
        hideInMenu: true,
      },
    },
    {
      path: 'system-menu',
      name: 'SystemMenu',
      component: () => import('@/views/system/menu/index.vue'),
      meta: {
        locale: '菜单管理',
        requiresAuth: true,
        permission: 'system:menu:list',
        iconfont: 'icon-he_2caidanguanli',
      },
    },
    {
      path: 'system-dept',
      name: 'SystemDept',
      component: () => import('@/views/system/dept/index.vue'),
      meta: {
        locale: '部门管理',
        requiresAuth: true,
        permission: 'system:dept:list',
        iconfont: 'icon-bumen',
      },
    },
    {
      path: 'system-post',
      name: 'SystemPost',
      component: () => import('@/views/system/post/index.vue'),
      meta: {
        locale: '岗位管理',
        requiresAuth: true,
        permission: 'system:post:list',
        iconfont: 'icon-gangwei',
      },
    },
    {
      path: 'system-dict',
      name: 'SystemDict',
      component: () => import('@/views/system/dict/index.vue'),
      meta: {
        locale: '字典管理',
        requiresAuth: true,
        permission: 'system:dict:list',
        iconfont: 'icon-zidian',
      },
    },
    {
      path: 'system-dict-data/:type',
      name: 'SystemDictData',
      component: () => import('@/views/system/dict/dict-data.vue'),
      meta: {
        locale: '字典数据',
        requiresAuth: true,
        hideInMenu: true,
      },
    },
    // {
    //   path: 'config',
    //   name: 'config',
    //   component: () => import('@/views/dashboard/workplace/index.vue'),
    //   meta: {
    //     locale: '参数设置',
    //     requiresAuth: true,
    //     roles: ['*'],
    //   },
    // },
    {
      path: 'system-notice',
      name: 'SystemNotice',
      component: () => import('@/views/system/notice/index.vue'),
      meta: {
        locale: '通知公告',
        requiresAuth: true,
        permission: 'system:notice:list',
        iconfont: 'icon-tongzhi',
      },
    },
    {
      path: 'system-log',
      name: 'SystemLog',
      component: PAGE_LAYOUT,
      meta: {
        locale: '日志',
        requiresAuth: true,
        iconfont: 'icon-rizhi',
      },
      children: [
        {
          path: 'system-operlog',
          name: 'SystemOperlog',
          component: () => import('@/views/system/log/operlog/index.vue'),
          meta: {
            locale: '操作日志',
            requiresAuth: true,
            permission: 'monitor:operlog:list',
            iconfont: 'icon-caozuorizhi',
          },
        },
        {
          path: 'system-logininfor',
          name: 'SystemLogininfor',
          component: () => import('@/views/system/log/logininfor/index.vue'),
          meta: {
            locale: '登录日志',
            requiresAuth: true,
            permission: 'monitor:logininfor:list',
            iconfont: 'icon-drxx92',
          },
        },
      ],
    },
  ],
};
